package com.zy.cat.entity.app.resp;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫App配置信息实体类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel("9趣猫App配置信息实体类")
public class CatAppConfigInfoResp implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2265060843754735238L;

	@ApiModelProperty(value = "最新版本信息", example = "{}")
    private CatAppVersionInfoResp version;
	
	@JsonProperty("login_mode")
	@ApiModelProperty(value = "登录方式(0.不可账号密码登录、1.支持账号密码登录)", example = "0")
    private int loginMode;
	
	@ApiModelProperty(value = "广告状态(0.关闭状态、1.打开状态)", example = "0")
    private int adStatus;
	
	@JsonProperty("splash_img")
	@ApiModelProperty(value = "开屏页图片地址", example = "http://")
    private String splashImg;
	
	@ApiModelProperty(value = "app底部中间按钮配置", example = "{}")
    private BottomButton mainBtn;
	
	@ApiModelProperty(value = "app首页侧悬浮按钮配置", example = "{}")
    private SideButton homeSideBtn;
	
	@ApiModelProperty(value = "app个人中心侧悬浮按钮配置", example = "{}")
    private SideButton centerSideBtn;
	
	@ApiModelProperty(value = "app首页头部logo位置配置", example = "{}")
    private HeaderLogoButton headerLogoBtn;
	
	@ApiModelProperty(value = "app启动首页弹窗配置", example = "{}")
    private HomeDialogConfig homeDialogConfig;
	
	@Data
	@ApiModel("app底部按钮配置")
	public static class BottomButton implements Serializable{
		/**
		 * 
		 */
		private static final long serialVersionUID = -1136394476958945633L;

		@ApiModelProperty(value = "底部按钮位置", example = "0")
		private int index;
	
		@ApiModelProperty(value = "按钮名称", example = "免费抽")
	    private String name;
		
		@ApiModelProperty(value = "按钮图标地址", example = "http://")
	    private String iconUrl;
		
		@ApiModelProperty(value = "按钮图标地址,IOS暗黑模式下", example = "http://")
	    private String iconDarkUrl;
		
		@ApiModelProperty(value = "展示页面链接", example = "http://")
	    private String pageUrl;
		
		@ApiModelProperty(value = "是否可手动刷新(0.不可手动刷新、1.可手动刷新)", example = "0")
		private int refresh;
		
		/**
		 *  rtype,cid
		 */
		@ApiModelProperty(value = "所需拼接参数列表")
		private String[] requestParams;
		
		@ApiModelProperty(value = "页面类型,0.免费抽、1.H5页面", example = "0")
		private int pageType;
	}
	
	@Data
	@ApiModel("app侧悬浮按钮配置")
	public static class SideButton implements Serializable{

		/**
		 * 
		 */
		private static final long serialVersionUID = -7928426544168495234L;

		@ApiModelProperty(value = "按钮位置(0.首页、1.我的)", example = "0")
		private int index;
	
		@ApiModelProperty(value = "按钮名称", example = "免费抽")
	    private String name;
		
		@ApiModelProperty(value = "按钮图标地址", example = "http://")
	    private String iconUrl;
		
		@ApiModelProperty(value = "展示页面链接", example = "http://")
	    private String pageUrl;
		
		@ApiModelProperty(value = "是否全屏(0.否、1.是)", example = "0")
		private int fullScreen;
		
		/**
		 *  rtype,cid
		 */
		@ApiModelProperty(value = "所需拼接参数列表")
		private String[] requestParams;
		
		@ApiModelProperty(value = "页面类型,0.游乐园、1.H5页面", example = "0")
		private int pageType;
	}
	
	@Data
	@ApiModel("app首页头部logo位置配置")
	public static class HeaderLogoButton implements Serializable{

		/**
		 * 
		 */
		private static final long serialVersionUID = -8522736193655381283L;

		@ApiModelProperty(value = "按钮名称", example = "双十一活动")
	    private String name;
		
		@ApiModelProperty(value = "按钮图标地址", example = "http://")
	    private String iconUrl;
		
		@ApiModelProperty(value = "展示页面链接", example = "http://")
	    private String pageUrl;
		
		@ApiModelProperty(value = "是否全屏(0.否、1.是)", example = "0")
		private int fullScreen;
		
		/**
		 *  rtype,cid
		 */
		@ApiModelProperty(value = "所需拼接参数列表")
		private String[] requestParams;
		
		@ApiModelProperty(value = "占手机总宽度的占比", example = "0")
		private Double widthRatio;
		
		@ApiModelProperty(value = "占应用图标的高度占比,占满上级控件-1，自适应高度-2", example = "0")
		private Double heightRatio;
	}
	
	@Data
	@ApiModel("app启动首页弹窗配置")
	public static class HomeDialogConfig implements Serializable{
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		/**
		 * 
		 */
		//private static final long serialVersionUID = -1136394476958945633L;

		@ApiModelProperty(value = "弹窗图片地址", example = "http://")
		private String iconUrl;
	
		@ApiModelProperty(value = "跳转链接地址", example = "http://")
	    private String pageUrl;
		
		@ApiModelProperty(value = "跳转页面名称", example = "")
	    private String name;
		
		@ApiModelProperty(value = "跳转类型,0.H5游戏、1.H5页面、 2.商品列表、3.跳转淘宝、4.选品库、5.系统浏览器、6.跳转拼多多、7.跳转京东", example = "2")
		private int pageType;
		
		@ApiModelProperty(value = "是否全屏(0.否、1.是)", example = "0")
		private int fullScreen;
		
		@ApiModelProperty(value = "是否每次进入弹窗(0.每天只弹一次、1.每次进入弹窗)", example = "0")
		private int dialogType;
		
		@ApiModelProperty(value = "弹窗ID", example = "0")
		private int id;
	}
}
